﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

public class ViolationInputModel : ModelBase
{

    /// <summary>
    /// 检查人员姓名
    /// </summary>
    [MaxLength(32)]
    public string CheckUserName { get; set; }

    /// <summary>
    /// 检查日期
    /// </summary>
    public DateTime? CheckDate { get; set; }

    /// <summary>
    /// 被检单位ID
    /// </summary>
    [MaxLength(32)]
    public string? OrganizationId { get; set; }

    /// <summary>
    /// 被检单位名称
    /// </summary>
    [MaxLength(200)]
    public string? OrganizationName { get; set; }

    /// <summary>
    /// 作业项目
    /// </summary>
    [MaxLength(100)]
    public string? WorkItem { get; set; }

    /// <summary>
    /// 作业性质
    /// </summary>
    [MaxLength(32)]
    public string? WorkType { get; set; }

    /// <summary>
    /// 作业工序
    /// </summary>
    [MaxLength(32)]
    public string? WorkProcess { get; set; }

    /// <summary>
    /// 位置区域
    /// </summary>
    [MaxLength(32)]
    public string? Location { get; set; }

    /// <summary>
    /// 违章描述
    /// </summary>
    [MaxLength(1000)]
    public string? Description { get; set; } = "";

    /// <summary>
    /// 违章性质
    /// </summary>
    [MaxLength(32)]
    public string? ViolactionType { get; set; }

    /// <summary>
    /// 违章对应条款
    /// </summary>
    [MaxLength(32)]
    public string? ViolationItem { get; set; }

    /// <summary>
    /// 违章类别
    /// </summary>
    [MaxLength(32)]
    public string? ViolationCategory { get; set; }

    /// <summary>
    /// 对应要素体系
    /// </summary>
    [MaxLength(32)]
    public string? HseElement { get; set; }

    /// <summary>
    /// 对应安全沟通类型
    /// </summary>
    [MaxLength(32)]
    public string? ObserveComm { get; set; }

    /// <summary>
    /// 原因分析
    /// </summary>
    [MaxLength(32)]
    public string? CauseAnalysis { get; set; }

    /// <summary>
    /// 归属直线部门
    /// </summary>
    [MaxLength(32)]
    public string? DirectDepartment { get; set; }

    /// <summary>
    /// 可能后果
    /// </summary>
    [MaxLength(32)]
    public string? PotentialConsequence { get; set; }

    /// <summary>
    /// 违章人员ID
    /// </summary>
    [MaxLength(32)]
    public string ViolationUserId { get; set; }

    /// <summary>
    /// 违章人员姓名
    /// </summary>
    [MaxLength(32)]
    public string? ViolationUserName { get; set; }

    /// <summary>
    /// 年龄
    /// </summary>
    [MaxLength(32)]
    public string? Age { get; set; }

    /// <summary>
    /// 工龄
    /// </summary>
    [MaxLength(32)]
    public string? WorkYears { get; set; }

    /// <summary>
    /// 用工性质
    /// </summary>
    [MaxLength(32)]
    public string? EmployeeType { get; set; }

    /// <summary>
    /// 违章岗位
    /// </summary>
    [MaxLength(32)]
    public string? Position { get; set; }

    /// <summary>
    /// 违章扣分
    /// </summary>
    public float? Score { get; set; }

    /// <summary>
    /// 罚款
    /// </summary>
    public float? Fine { get; set; }

    /// <summary>
    /// 图片
    /// </summary>
    [MaxLength(1000)]
    public string? Pic { get; set; }
    public override void ConfigureMapper(Profile profile)
    {
        profile.CreateMap<QHSESysXyViolation, QHSEXyViolationModel>()
            .ForMember(d => d.QhseXyViolationId, options => options.MapFrom(s => s.QhseXyViolationId))
            .ForMember(d => d.UserId, options => options.MapFrom(s => s.UserId));

        profile.CreateMap<QHSEXyViolationModel, QHSESysXyViolation>()
            .ForMember(d => d.QhseXyViolationId, options => options.MapFrom(s => s.QhseXyViolationId))
            .ForMember(d => d.UserId, options => options.MapFrom(s => s.UserId));
    }
}
